home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / vol16n13.zip / OPENTR.ZIP / OT_SRC.ZIP / PAGEDLG.CPP < prev    next >
C/C++ Source or Header  |  1997-05-26  |  1KB  |  60 lines

  1. // PageDlg.cpp : implementation file
  2. //
  3. // This module implements the "Select Page" dialog.
  4. // OpenTrap Version 1.00 by Gregory A. Wolking
  5. // Copyright ⌐ 1997 Ziff-Davis Publishing
  6. // First published in PC Magazine, US Edition, July 1997.
  7.  
  8. #include "stdafx.h"
  9. #include "OpenTrap.h"
  10. #include "PageDlg.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CPageDlg dialog
  20.  
  21.  
  22. CPageDlg::CPageDlg(CWnd* pParent /*=NULL*/)
  23.     : CDialog(CPageDlg::IDD, pParent)
  24. {
  25.     //{{AFX_DATA_INIT(CPageDlg)
  26.     m_intPageNum = 1;
  27.     m_intEndPage = 99;
  28.     //}}AFX_DATA_INIT
  29. }
  30.  
  31.  
  32. void CPageDlg::DoDataExchange(CDataExchange* pDX)
  33. {
  34.     CDialog::DoDataExchange(pDX);
  35.     //{{AFX_DATA_MAP(CPageDlg)
  36.     DDX_Control(pDX, IDC_lblPageRange, m_lblPageRange);
  37.     DDX_Text(pDX, IDC_txtPageNum, m_intPageNum);
  38.     DDV_MinMaxUInt(pDX, m_intPageNum, 1, m_intEndPage);
  39.     //}}AFX_DATA_MAP
  40. }
  41.  
  42.  
  43. BEGIN_MESSAGE_MAP(CPageDlg, CDialog)
  44.     //{{AFX_MSG_MAP(CPageDlg)
  45.     //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CPageDlg message handlers
  50.  
  51. BOOL CPageDlg::OnInitDialog() 
  52. {
  53.     CDialog::OnInitDialog();
  54.     
  55.     CString txt;
  56.     txt.Format("Enter a page number from 1 to %u:", m_intEndPage);
  57.     m_lblPageRange.SetWindowText(txt);
  58.     return TRUE;
  59. }
  60.